package com.one.service;

import com.one.util.RequestReturn;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDate;
import java.util.Map;

/**
 * Create on 2022-01-20
 * <p>
 * Author: LiangWei
 * <p>
 * Description:
 **/
@FeignClient(name = "street-sign")
public interface SignService {
    /**
     * 签到
     */
    @GetMapping("/doSign")
    RequestReturn<String> doSign(@RequestParam("userId") Integer userId);

    /**
     * 查询用户当天是否已经签到
     */
    @GetMapping("/checkSign")
    RequestReturn<String> checkSign(@RequestParam("userId") Integer userId,@RequestParam("date") String date);

    /**
     * 查询用户某个月的签到次数
     */
    @GetMapping("/getSignCountOneMonth")
    RequestReturn<Long> getSignCountOneMonth(@RequestParam("userId") Integer userId,@RequestParam("date") String date);

    /**
     * 获取用户某个月连续签到次数
     */
    @GetMapping("/getContinuousSignCount")
    RequestReturn<Long> getContinuousSignCount(@RequestParam("userId") Integer userId,@RequestParam("date") String date);

    /**
     * 获取用户某个月第一次签到的次数
//     */
//    @GetMapping("/getFirstSignDate")
//    RequestReturn<LocalDate> getFirstSignDate(@RequestParam("userId") Integer userId,@RequestParam("date") String date);

    /**
     * 获取用户某个月的签到流水
     */
    @GetMapping("/getSignInfo")
    RequestReturn<Map<String,Boolean>> getSignInfo(@RequestParam("userId") Integer userId, @RequestParam("date") String date);

    /**
     * 获取用户当月最多连续签到次数
     */
    @GetMapping("/getContinuousSignCountByTotalMonth")
    RequestReturn<Long> getContinuousSignCountByTotalMonth(@RequestParam("userId") Integer userId,@RequestParam("date") String date);

    /**
     * 补签
     */
    @GetMapping("/BQ")
    RequestReturn<String> getContinuousSignCountBQ(@RequestParam("userId") Integer userId,@RequestParam("date") String date);
}
